package com.fnzn.entranceGuard.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.fnzn.entranceGuard.entity.GuardIcDevice;
import com.fnzn.entranceGuard.vo.GuardDeviceVo;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * IC设备关联 Mapper 接口
 * </p>
 *
 * @author JokerGao
 * @since 2018-08-17
 */
@Repository
public interface GuardIcDeviceMapper extends BaseMapper<GuardIcDevice> {

    Integer deleteByIcInfoIdAndDeviceId(@Param("icInfoId")String icInfoId, @Param("deviceId")Integer deviceId);

    List<GuardDeviceVo> getByIcInfoId(String icInfoId);

    Integer updateStatusByDeviceIdAndIcInfoId(@Param("deviceId")Integer deviceId, @Param("icInfoId")String icInfoId, @Param("status")String status);

    Integer updateStatusByIcInfoId(String icInfoId);

    Integer updateStatusByIcInfoIdAndDeviceId(@Param("icInfoId")String icInfoId, @Param("deviceId")Integer deviceId);

    Integer updateStatusTo3ByIcInfoIdAndDeviceId(@Param("icInfoId")String icInfoId, @Param("deviceId")Integer deviceId);

    List<GuardDeviceVo> getByDeviceId(Integer deviceId);

    List<GuardDeviceVo> getGuardDeviceVo();

    Integer updateStatusTo4ById(String id);

    List<GuardIcDevice> selectByGuardIcInfoId(String guardIcInfoId);
}
